/*
*		·ÖÖ§Ïß³Ì£¬½«»º³åÇøÊý¾Ý·ÖÖ§·¢ËÍ
*/
#pragma once

#include "CxType.h"
#include "CxThread.h"
#include "CxLinerBuffer.h"


//·ÖÖ§Êý¾Ý
class CxBranchThread	:public		CxThread
{
	typedef DataRevPart::CxLinerBuffer			_Buffer;
	typedef boost::mutex						_Mutex;
	typedef boost::condition_variable_any		_Cond;
public:
	//ÒÀ´ÎÊÇ½ÓÊÕ»º³åÇø£¬´¦Àí»º³åÇø£¬Êý¾Ý¿â»º³åÇø
    CxBranchThread(_Buffer	* /*Rev Buffer*/,_Buffer * /*handle Buffer*/,_Buffer * /*DB Buffer*/,size_t );
	~CxBranchThread();

public:
	//×´Ì¬²Ù×÷º¯Êý
	void		Start();
	void		Close();

	UINT		GetState()const{return m_state;}

protected:
	//ÔËÐÐº¯Êý
	void		RunFunc();

private:
	bool		m_spin;
	size_t		m_number;
private:

	//»º³åÇø¶ÔÏó
	_Buffer		*m_revbuffer;
	_Buffer		*m_databasebuffer;
	_Buffer		*m_handlebuffer;
	
};
